feat(protect): add support for deeply nested protect schemas#155
feat(protect): add support for deeply nested protect schemas#155calvinbrewer merged 6 commits intomainfrom
Conversation
|
The encrypt config will look like the following and the |
CDThomas
left a comment
There was a problem hiding this comment.
Left a few minor comments, but LGTM otherwise.
| Protect.js supports nested objects in your schema, allowing you to encrypt **but not search on** nested properties. You can define nested objects up to 3 levels deep. | ||
| This is useful for data stores that have less structured data, like NoSQL databases. | ||
|
|
||
| You can define nested objects by using the `csValue` function to define a value in a nested object. The value naming convention of the `csValue` function is a dot-separated string of the nested object path, e.g. `profile.name` or `profile.address.street`. |
There was a problem hiding this comment.
The column/attribute name in the DB table can't contain a . since we're using it a delimiter, right? Definitely an edge case, but thought it was worth mentioning.
This makes sense to me @calvinbrewer. I think the main thing we want to do on the client at the moment is to only decrypt the specific fields that have been configured as encrypted (as opposed to blindly decrypting anything that looks like a ciphertext). |
Added support for nested objects in Protect schemas, allowing you to encrypt and search on nested properties through the model interfaces. E.g.
When working with nested objects: